import request from '@/utils/request'

//获取图片接口
export const reqSpuImageList=(spuId)=>request({url:`/admin/product/spuImageList/${spuId}`,method:'get'})

//获取平台全部销售属性---整个平台销售属性一共三个
export const reqSpuSaleAttrList=(spuId)=>request({url:`/admin/product/spuSaleAttrList/${spuId}`,method:'get'})

//获取平台商品属性
//GET /admin/product/attrInfoList/{category1Id}/{category2Id}/{category3Id}
export const reqAttrInfoList=(category1Id,category2Id,category3Id)=>request({url:`/admin/product/attrInfoList/${category1Id}/${category2Id}/${category3Id}`,method:'get'})

//sku管理中获取sku列表的数据
export const reqSkuList=(page,limit)=>request({url:`/admin/product/list/${page}/${limit}`,method:'get'})

//上架的接口
export const reqSale =(skuId)=>request({url:`/admin/product/onSale/${skuId}`,method:'get'})


//下架的接口
export const reqCancel =(skuId)=>request({url:`/admin/product/cancelSale/${skuId}`,method:'get'})

//获取sku详情的接口
export const reqSkuById =(skuId)=>request({url:`/admin/product/getSkuById/${skuId}`,method:'get'})